package com.net.xpay.core.domain.auto;

import com.net.xpay.common.enums.user.ServicePayMode;
import com.net.common.domain.VersionedDomain;
import com.net.xpay.core.enums.AutoPayTransBatchStatus;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * 自动付充值批次
 */
@Getter
@Setter
@NoArgsConstructor
public class AutoPayTransBatch extends VersionedDomain {

    @ApiModelProperty(notes = "用户id")
    private Long userId;

    @ApiModelProperty(notes = "合伙人id")
    private Long partnerId;

    @ApiModelProperty(notes = "父级合伙人id")
    private Long fatherPartnerId;

    @ApiModelProperty(notes = "状态")
    private AutoPayTransBatchStatus status;

    @ApiModelProperty(notes = "业务号")
    private String bizId;

    @ApiModelProperty(notes = "支付宝账号id")
    private Long alipayUserId;

    @ApiModelProperty(notes = "支付宝账号")
    private String alipayNickName;

    @ApiModelProperty(notes = "收费模式")
    private ServicePayMode mode;

    @ApiModelProperty(notes = "服务费收费比例")
    private BigDecimal serviceRatio;

    @ApiModelProperty(notes = "服务费单价 分")
    private Long serviceUnitPrice;

    @ApiModelProperty(notes = "服务费 分")
    private Long servicePrice;

    @ApiModelProperty(notes = "服务费退款 分")
    private Long refund;

    @ApiModelProperty(notes = "批次总金额，单位为元，精确到小数点后两位，取值范围[0.01,9999999999999.99]  必选")
    private String totalTransAmount;

    @ApiModelProperty(notes = "批次总笔数 10 必选")
    private Long totalCount;

    @ApiModelProperty(notes = "成功金额 单位为元")
    private String successAmount;

    @ApiModelProperty(notes = "成功笔数")
    private Long successCount;

    @ApiModelProperty(notes = "失败金额")
    private String failedAmount;

    @ApiModelProperty(notes = "失败笔数")
    private Long failCount;

    @ApiModelProperty(notes = "支付宝发起支付后返回的 支付宝批次订单号")
    private String batchTransId;

    @ApiModelProperty(notes = "最后一次发起的付款链接")
    private String lastPayUrl;

    @ApiModelProperty(notes = "最后一次发起的移动端付款链接")
    private String lastMobilePayUrl;

    @ApiModelProperty(notes = "生成的移动端付款二维码")
    private String mobilePayQrCode;

    @ApiModelProperty(notes = "处理开始时间")
    private LocalDateTime dealingTime;

    @ApiModelProperty(notes = "完成时间")
    private LocalDateTime endTime;

    @ApiModelProperty(notes = "备注")
    private String remark;


    public static AutoPayTransBatch getInstance() {
        return new AutoPayTransBatch();
    }
}
